import request from '@/utils/request'

export default {
  //1.根据id查询章节和里面的小节
  getChapterVideo(courseId){
    return request({
      url:`/admin/edu/chapter/getChapterVideo/${courseId}`,
      method:'get'
    })
  },
  //添加章节
  addChapter(chapter){
    return request({
      url:`/admin/edu/chapter/addChapter/`,
      method:'post',
      data:chapter
    })
  },
  //修改章节
  updateChapter(chapter){
    return request({
      url:`/admin/edu/chapter/updateChapter/`,
      method:'post',
      data:chapter
    })
  },
  //根据id查询章节
  getChapterInfo(chapterId){
    return request({
      url:`/admin/edu/chapter/getChapterInfo/${chapterId}`,
      method:'get'
    })
  },
  //删除章节
  deleteChapter(chapterId){
    return request({
      url:`/admin/edu/chapter/${chapterId}`,
      method:'delete'
    })
  }
}
